#!/usr/bin/python
# -*- coding: UTF-8 -*-
counter = 100 # 
miles = 1000.0 # 
name = "John" # 
str = 'Hello World!'  # @ReservedAssignment

print(counter)
print(miles)
print(name)
print(str)
print(str[0])
print(str[2:5])
print(str[2:])
print(str*2)
print(str+"test")

#集合应用
list = ['runoob', 786 , 2.23, 'john', 70.2];  # @ReservedAssignment
tinylist = [123, 'john']
print("集合应用===============================================================")
print(list)
print(list[0])
print(list[2:5])
print(list[2:])
print(list*2)
print(list+tinylist)

#元组
tuple = ('runoob',  # @ReservedAssignment
         786,
         2.23,
         'john',
         70.2)
tinyuple = (123, 'john')
print("元组===============================================================")
print(tuple)
print(tuple[0])
print(tuple[2:5])
print(tuple[2:])
print(tuple*2)
print(tuple+tinyuple)

#map key value
dict = {}  # @ReservedAssignment
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'john','code':6734, 'dept': 'sales'}
print("map key value 数据===============================================================")
print(dict['one'])          # 输出键为'one' 的值
print(dict[2])              # 输出键为 2 的值
print(tinydict)             # 输出完整的字典
print(tinydict.keys())      # 输出所有键
print(tinydict.values())    # 输出所有值

#数据类型转换

